package com.bluesky.service.lesson011;

import com.baomidou.mybatisplus.extension.service.IService;
import com.bluesky.dto.lesson011.Job;
import com.bluesky.dto.lesson011.JobCreateRequest;
import com.bluesky.dto.lesson011.JobUpdateRequest;
import com.bluesky.po.lesson011.JobPO;

import java.util.List;

public interface JobService extends IService<JobPO> {

    /**
     * 创建job
     * @param request
     * @return
     */
    String jobCreate(JobCreateRequest request);


    /**
     * 更新job
     * @param request
     * @return
     */
    boolean jobUpdate(JobUpdateRequest request);

    /**
     * 删除job
     * @param id
     * @return
     */
    boolean jobDelete(String id);

    /**
     * 启动job
     * @param id
     * @return
     */
    boolean jobStart(String id);

    /**
     * 停止job
     * @param id
     * @return
     */
    boolean jobStop(String id);

    /**
     * 获取job列表
     * @return
     */
    List<Job> jobList();

    /**
     * 获取需要启动的job列表
     * @return
     */
    List<Job> getStartJobList();
}
